﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" AutoEventWireup="true" CodeBehind="Browse.aspx.cs" Inherits="QSASPMVCApplicationCSharp.Views.Products.Browse" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Browse Products</h2>

    <table>
        <tr>
            <td width="40"></td>
            <td><strong>Product Name</strong></td>
            <td><strong>Unit Price</strong></td>
        </tr>
    
        <% foreach(var product in ViewData.Model) { %>
    
        <tr>
            <td><%=Html.ActionLink("Edit", "Edit", new { id=product.ProductId } ) %></td>
            <td><%=product.ProductName %></td>
            <td><%=product.UnitPrice %></td>
        </tr>
    
        <% } %>
    
    </table>

    <h2>
        <a href="/Products/Create">Add New Product</a>
    </h2>
    
</asp:Content>
